home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # pls - package list
- # copyright (c) 2000, joseph cheek, joseph@redmondlinux.org
- # released under gpl.
- #
- # $1: [partial] file to list. can be with or without pathname.
- # ex: pls /opt/redmondLinux/builds/21/myfile
- # ex: pls col/install/myfile
- # ex: pls myfile
- #
- # opts: -q: quiet [don't print status messages]
- # -v: verbose
-
- if [ "n$1" = "n-q" ]; then # -q
- QUIET="-q"
- shift
- fi
-
- if [ "n$1" = "n-v" ]; then # -v
- VERBOSE="-v"
- shift
- fi
-
- if [ "$#" -ne 1 ]; then # wrong number of args
- ( echo `basename $0`: wrong number of arguments given
- echo
- echo usage: `basename $0` \[-q\] package
- echo lists package in redmond linux build system
- echo -q is quiet, ie don\'t print status messages
- echo -v is verbose ) >&2
- exit 1
- fi
-
-
- # constants and vars
-
- RL_ROOT=/opt/redmondlinux
- BUILD_NUM_FILE=$RL_ROOT/builds/CURRENT_BUILD
- BUILD_NUM=`cat $BUILD_NUM_FILE`
-
- BUILD_ROOT=$RL_ROOT/builds/$BUILD_NUM
- BUILD_ROOT_LEN=$[ `echo $BUILD_ROOT | wc -c` - 0 ]
- # gives len of build_root plus 1
-
- unset PATH_NAME
-
- FILE_GLOB="$1"
-
- #
- #
- # check for the file
-
- # PATH_HEADER=`echo $PATH_NAME | cut -b 1-$BUILD_ROOT_LEN`
-
- # if [ "$PATH_HEADER" != "$BUILD_ROOT/" ]; then # not in build root
- # ( echo `basename $0`: $1 not in build root
- # echo
- # echo usage: `basename $0` \[-q\] file
- # echo lists file in redmond linux build system
- # echo -q is quiet, ie don\'t print status messages
- # echo -v is verbose ) >&2
- # exit 1
- # fi
-
-
- #
- #
- # perform ls
-
- for a in ${BUILD_ROOT}/*; do
- find ${a}/rl -name \*${FILE_GLOB}\*
- done
-
- exit 0
-